package com.t249.bdqn.renting.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.stereotype.Component;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import java.io.Serializable;

@Data
@Component
@TableName(value = "ret_rental_information")
public class RetRentalInformation implements Serializable {

    //id
    @TableId(value = "ret_id", type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableField("ret_id")
    private Integer retId;

    //楼盘
    @TableField("lease_out")
    private String leaseOut;

    //租房城市id
    @TableField("address_Id")
    private String addressId;

    //租房区域id
    @TableField("region_Id")
    private String regionId;

    //出租金
    @TableField("money")
    private String money;

    //租期
    @TableField("housing_Id")
    private String housingId;

    //出租类型:合租:1  整租:2
    @TableField("huxing_Id")
    private String huxingId;

    //面积
    @TableField("measure")
    private String measure;

    //押付方式
    @TableField("payment_Id")
    private String paymentId;

    //房源描述
    @TableField("ret_describe")
    private String retDescribe;

    //图片描述
    @TableField("ret_picture")
    private String retPicture;

    //房源状态
    @TableField("ret_typeId")
    private String retTypeId;

    //房屋出租状态
    @TableField("ret_rentingId")
    private String retRentingId;

    //当出租类型为”合租“就为总面积，否则为总楼层
    @TableField("zon_measure")
    private String zonMeasure;

    //当出租类型为”合租“就为房间数，否则为楼层
    @TableField("ret_fanjianshu")
    private String retFanjianshu;

    //经度
    @TableField("ret_lng")
    private String retLng;

    //纬度
    @TableField("ret_lat")
    private String retLat;

    //室
    @TableField("ret_shi")
    private String retShi;

    //厅
    @TableField("ret_ting")
    private String retTing;

    //卫
    @TableField("ret_wei")
    private String retWei;

    //乡镇
    @TableField("ret_propertiesId")
    private String retPropertiesId;

    //交通描述
    @TableField("ret_jiaoton")
    private String retJiaoton;

    //房源户主id
    @TableField("user_Id")
    private String userId;

    //发起时间
    @TableField("FAQISHIJIAN")
    private String shijiang;

    //发起时间
    public String getShijiang() {
        String pay_time = null;
        if (this.shijiang != null && this.shijiang != "") {
            pay_time = this.shijiang.replace(".0", "");
        }
        return pay_time;
    }

    public void setShijiang(String shijiang) {
        this.shijiang = shijiang;
    }

}
